package models;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;

import play.data.validation.Email;
import play.data.validation.MaxSize;
import play.data.validation.Required;
import play.db.jpa.Model;

@Entity
@Table(name="comment")
public class Comment extends Model {

	@Required
	@Column(name="username")
	public String username;
	
	@Required
	@Column(name="subject")
	public String subject;
	
	@Column(name="email")
	@Required
	@Email
	public String email;
	
	@Column(name="feedback")
	@Required
	@MaxSize(50000)
	@Lob
	public String feedback;
	
	@Column(name="submit_time")
	public Date submitTime = new Date();
	
}
